<?php
namespace app\api\model;
use think\Model;

class PetsPhoto extends Model {
    public function album() {
        return $this->hasMany('PetsPhotoAlbum', 'photo_id')->field('photo_id,img');
    }
    public function comments() {
        return $this->hasMany('PetsPhotoComments', 'photo_id');
    }
}
